<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function aa(){
        var xhr = new XMLHttpRequest();
        xhr.open('get','true.php',true);
        xhr.send(null);
        xhr.onreadystatechange = function(){
            if(this.readyState == 4){
                alert(JSON.parse(this.responseText)['name']);
            }
        }
        console.log('测试1111');
    }
    aa();
</script>
</body>
</html>